import { createApp } from 'vue'
import App from '@/App.vue'
//引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//svg需要的配置代码
import 'virtual:svg-icons-register'
//console.log(import.meta.env)
import gloablComponent from './components/index'
//引入样式
import './styles/index.scss'
//引入路由
import router from './router'
//引入pinia
import pinia from './store'
//获取应用实例对象
const app = createApp(App)
//安装element-plus插件
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(gloablComponent)
//注册pinia
app.use(pinia)
//注册路由
app.use(router)
// 引入路由守卫
import './router/permission.ts'
//将应用挂载到挂载点上
app.mount('#app')
